import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:taonile/config/config.dart';
import 'package:taonile/routers/routers.dart';

///
/// 先择入驻形式
///
class MyStoreToJoin extends StatefulWidget {
  const MyStoreToJoin({Key? key}) : super(key: key);

  @override
  State<MyStoreToJoin> createState() => _MyStoreToJoinState();
}

class _MyStoreToJoinState extends State<MyStoreToJoin> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Config.colorBg2,
        appBar: AppBar(
          title: const Text('我的店铺'),
          centerTitle: true,
        ),
        body: Container(
          width: double.infinity,
          height: double.infinity,
          padding: EdgeInsets.symmetric(vertical: 25.w, horizontal: 20.w),
          margin: EdgeInsets.fromLTRB(30.w, 30.w, 30.w, 0),
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(12.w),
          ),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text(
                '前往入驻，创建您的店铺',
                style: TextStyle(fontSize: 26.sp, color: Config.colorText1),
              ),
              Padding(
                padding: EdgeInsets.only(top: 30.w),
              ),
              Container(
                height: 90.w,
                width: double.infinity,
                child: ElevatedButton(
                  clipBehavior: Clip.antiAlias,
                  onPressed: () {
                    Routes.navigateTo(context, Routes.myStoreToJoinMall).then((value) {
                      Routes.router.pop(context);
                    });
                  },
                  style: ButtonStyle(
                    elevation: MaterialStateProperty.all(0),
                    backgroundColor: MaterialStateProperty.all(Colors.blue),
                    shape: MaterialStateProperty.all(
                      RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(45.w),
                      ),
                    ),
                    side: MaterialStateProperty.all(
                      BorderSide(color: Colors.transparent, width: 2.w),
                    ),
                  ),
                  child: Text(
                    '商城入驻(线上电商入驻)',
                    style: TextStyle(fontSize: 24.sp, color: Config.colorWhite),
                  ),
                ),
              ),
              Padding(
                padding: EdgeInsets.only(top: 30.w),
              ),
              Container(
                height: 90.w,
                width: double.infinity,
                child: ElevatedButton(
                  clipBehavior: Clip.antiAlias,
                  onPressed: () {
                    Routes.navigateTo(context, Routes.myStoreToJoinStore).then((value) {
                      Routes.router.pop(context);
                    });
                  },
                  style: ButtonStyle(
                    elevation: MaterialStateProperty.all(0),
                    backgroundColor: MaterialStateProperty.all(Colors.orange),
                    shape: MaterialStateProperty.all(
                      RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(45.w),
                      ),
                    ),
                    side: MaterialStateProperty.all(
                      BorderSide(color: Colors.transparent, width: 2.w),
                    ),
                  ),
                  child: Text(
                    '商圈入驻(附近实体店入驻)',
                    style: TextStyle(fontSize: 24.sp, color: Config.colorWhite),
                  ),
                ),
              ),
              Padding(
                padding: EdgeInsets.only(top: 150.w),
              ),
            ],
          ),
        ));
  }
}
